﻿using System;
class ComparingArrays
{
    static void Main()
    {
        int lenght;
        Console.Write("please enter the lenght of arrays: ");
        while (true)
        {
            try
            {
                lenght = int.Parse(Console.ReadLine());
                break;
            }
            catch (Exception)
            {
                Console.Write("Please re-enter lenght:");
            }
        }
        int[] arrayOne;
        arrayOne = new int[lenght];
        int[] arrayTwo;
        arrayTwo = new int[lenght];
        for (int i = 0; i < lenght; i++)
        {
            Console.Write("Please enter the {0} element of array one: ", i);
            while (true)
            {
                try
                {
                    arrayOne[i] = int.Parse(Console.ReadLine());
                    break;
                }
                catch (Exception)
                {
                    Console.Write("Please re-enter element:");
                }
            }
        }
        Console.WriteLine();
        for (int i = 0; i < lenght; i++)
        {
            Console.Write("Please enter the {0} element of array two: ", i);
            while (true)
            {
                try
                {
                    arrayTwo[i] = int.Parse(Console.ReadLine());
                    break;
                }
                catch (Exception)
                {
                    Console.Write("Please re-enter element:");
                }
            }
        }
        Console.WriteLine();
        for (int i = 0; i < lenght; i++)
        {
            if (arrayOne[i] == arrayTwo[i])
            {
                Console.WriteLine("the elemnts {0} of arrays \"one\" and \"two\" are {1} and {2} - {1} = {2}", i, arrayOne[i], arrayTwo[i]);
            }
            else
            {
                if (arrayOne[i] > arrayTwo[i])
                {
                    Console.WriteLine("the elemnts {0} of arrays \"one\" and \"two\" are {1} and {2} - {1} > {2}", i, arrayOne[i], arrayTwo[i]);
                }
                else
                {
                    Console.WriteLine("the elemnts {0} of arrays \"one\" and \"two\" are {1} and {2} - {1} < {2}", i, arrayOne[i], arrayTwo[i]);
                }
            }
        }
        Console.ReadLine();
    }
}

